package tcp;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class ServerCreate {
	/*
	 * 根据对应端口创建socket
	 */
	private int port;
	
	public ServerCreate(int port){
		this.port=port;
		
	}
	
	public Socket servercreat() throws Exception{
		ServerSocket server=new ServerSocket(port);
		Socket socket=server.accept();
		return socket;
	}

}
